package com.example.supplychainbackend.mapper;

import com.example.supplychainbackend.controller.dto.production.ProductionCertDto;
import com.example.supplychainbackend.controller.dto.production.ProductionProcessDto;
import com.example.supplychainbackend.controller.dto.production.ProductionSchedulingDto;
import com.example.supplychainbackend.controller.dto.production.ProductionWorkorderDto;
import com.example.supplychainbackend.entity.production.ProductionCertEntity;
import com.example.supplychainbackend.entity.production.ProductionProcessEntity;
import com.example.supplychainbackend.entity.production.ProductionSchedulingEntity;
import com.example.supplychainbackend.entity.production.ProductionWorkorderEntity;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;

import java.util.List;

@Mapper(componentModel = "spring",
        builder = @Builder(disableBuilder = true),
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface ProductionMapper {
    ProductionCertDto toProductionCertDto(ProductionCertEntity entity);
    ProductionCertEntity toProductionCertEntity(ProductionCertDto dto);
    List<ProductionCertDto> toProductionCertDtoList(List<ProductionCertEntity> entities);
    ProductionWorkorderDto toProductionWorkorderDto(ProductionWorkorderEntity entity);
    ProductionWorkorderEntity toProductionWorkorderEntity(ProductionWorkorderDto dto);
    List<ProductionWorkorderDto> toProductionWorkorderDtoList(List<ProductionWorkorderEntity> entities);
    ProductionSchedulingDto toProductionSchedulingDto(ProductionSchedulingEntity entity);
    ProductionSchedulingEntity toProductionSchedulingEntity(ProductionSchedulingDto dto);
    List<ProductionSchedulingDto> toProductionSchedulingDtoList(List<ProductionSchedulingEntity> entities);
    ProductionProcessDto toProductionProcessDto(ProductionProcessEntity entity);
    ProductionProcessEntity toProductionProcessEntity(ProductionProcessDto dto);
    List<ProductionProcessDto> toProductionProcessDtoList(List<ProductionProcessEntity> entities);

    void updateProductionSchedulingEntity(@MappingTarget ProductionSchedulingEntity entity, ProductionSchedulingDto dto);
}
